package com.luoc.spring.factoryBean;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

/**
 * @author luoc
 * @version 1.0
 * @date 2021/3/19 16:21
 * @since 1.0
 */
public class test {

    public static void main(String[] args) {
        BeanFactory bf = new XmlBeanFactory(new ClassPathResource("beanFactoryTest.xml"));

        Car car = (Car) bf.getBean("car");
        System.out.println(car.getBrand());
    }
}
